package main

import (
	"fmt"
	"strconv"
)
type TreeNode struct {
	Val int
	Left *TreeNode
	Right *TreeNode
}
func findDuplicateSubtrees(root *TreeNode) []*TreeNode {
    mp:=make(map[string]int)
    ans:=make([]*TreeNode,10)
    var helper func(root *TreeNode)string 
    helper=func(root *TreeNode)string{
        if root==nil{
            return "#"
        }
        res:=helper(root.Left) +","+helper(root.Right)+","+strconv.Itoa(root.Val)
        if mp[res]==1{
            ans=append(ans,root)
        }
        mp[res]++
        return res
    }
    return nil
}

func main(){
	fmt.Println(string(99))
}
